Skip to main content

Connect a data source

Introduction

In this guide, you will learn how to connect to a data source in a Digisquares platform. By generating a test REST API, creating a project, and configuring your database, you can seamlessly integrate and manage your data within the platform. This process involves setting up an API, creating a database schema, and testing the connection to ensure everything is functioning correctly. Follow the outlined steps to establish a robust data connection for your application.

Generate an API and Sample Data

  • Use Digiquares's API generator to create a test REST API.
  • Generate a data set including user's ID, name, email address, and access status.
  • Save the Endpoint URL.

Connect to the Database

  • Navigate to the 'Database' menu in your application.
  • Create a schema and tables with fields like ID, Name, Email, and IsBlocked.
  • Save the schema to create tables in the database.

Configure Data Source

  • Go to the 'Resources' tab and create a new REST API resource.
  • Paste the Endpoint URL into the Base URL field.
  • Save the resource configuration.

Create an App and Test the Connection

  • Create an app named User Management.
  • Rename the default query to getUsers.
  • Ensure the resource is selected and the query sends a GET request.
  • Run the query to verify connection and view JSON response.

Conclusion

By following these steps, you have successfully connected to a data source in a Digisquares platform. This setup allows you to manage and interact with your data effortlessly, enabling you to focus on building and enhancing your application. With the database connected and verified, you can now proceed to develop your UI and other application features with confidence.